<ul class="oul">
    <!-- <li>
        <a href="">
            <img src="" alt="">
            <p></p>
        </a>
    </li>
    <li>
        <a href="">
            <img src="" alt="">
            <p></p>
        </a>
    </li>
    <li>
        <a href="">
            <img src="" alt="">
            <p></p>
        </a>
    </li> -->
</ul>
<script>

    let str1="helloworld";
    let str2='helloworld';

    // 模板字符串 用反引号括起来的字符串
    let str3=`helloworld`



    let oul=document.getElementsByClassName("oul")[0]

    // oul.innerHTML='<li><a href=""><img src="" alt=""><p>1</p</a></li><li><a href=""><img src="" alt=""><p>2</p</a></li><li><a href=""><img src="" alt=""><p>3</p</a></li><li><a href=""><img src="" alt=""><p>4</p</a></li><li><a href=""><img src="" alt=""><p>5</p</a></li>'

    let arr=["./img/1.png","./img/2.png","./img/3.png"]

    /* oul.innerHTML='<li>'+
                    '<a href="">'+
                        '<img src="'+arr[0]+'" alt="">'+
                        '<p></p>'+
                    '</a>'+
                '</li>'+
                '<li>'+
                    '<a href="">'+
                        '<img src="'+arr[1]+'" alt="">'+
                        '<p></p>'+
                    '</a>'+
                '</li>' */





     oul.innerHTML=`<li>
                        <a href="">
                            <img src="${arr[0]}" alt="">
                            <p>1</p>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <img src="${arr[1]}" alt="">
                            <p>2</p>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <img src="${arr[2]}" alt="">
                            <p>3</p>
                        </a>
                    </li> `

// ${表达式}
let name1="小明"
console.log(`我叫${"王"+name1}，我今年${1+2}岁,我是${false?"女生":"男生"}`);


</script>